import request from '@/utils/request'

export const GetProductSpecPage = (pageNum, pageSize) => {
  return request({
    url: `/admin/product/spec/page/${pageNum}/${pageSize}`,
    method: 'get',
  })
}

export const DeleteProductSpecById = id => {
  return request({
    url: `/admin/product/spec/deleteById/${id}`,
    method: 'delete',
  })
}

export const GetProductSpecById = id => {
  return request({
    url: `/admin/product/spec/getById/${id}`,
    method: 'get',
  })
}

export const UpdateProductSpecById = productSpec => {
  return request({
    url: `/admin/product/spec/updateById`,
    method: 'put',
    data: productSpec,
  })
}

export const SaveProductSpec = productSpec => {
  return request({
    url: `/admin/product/spec/save`,
    method: 'post',
    data: productSpec,
  })
}

export const FindAllProductSpec = () => {
  return request({
    url: `/admin/product/spec/findAll`,
    method: 'get',
  })
}
